import request from './request'
import { UserType } from './type'

export function loginApi(user: UserType) {
  return request({
    method: 'post',
    url: '/auth/login',
    data: {
      user
    }
  })
}

export function registerAPi(user: UserType) {
  return request({
    method: 'post',
    url: '/auth/register',
    data: {
      user
    }
  })
}

export function getUserInfoApi() {
  return request({
    method: 'get',
    url: '/auth/getUserInfo',
  })
}